import requests
from bs4 import BeautifulSoup

url="https://www.baidu.com"
heapq={"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"}
r=requests.get(url=url,headers=heapq)
yuanma=r.text
soup=BeautifulSoup(yuanma,"lxml")
# a=soup.select('#su')[0].attrs['value']
# print(a)
c= soup.find('input',{'id':'su'}).get('value')
print(c)
# b=soup.select('//input[@id="su"]/@value')[0]

